$themes: (
  red: (
    font-color: red,
  ),
  green: (
    font-color: green 
  ),
  blue: (
    font-color: blue
  ),
);
$background: #f6f6f6;
@mixin themify($themes: $themes) {
  @each $theme-name, $map in $themes {

    .theme-#{$theme-name} & {
      $theme-map: () !global;
      @each $key, $value in $map {
        $theme-map: map-merge($theme-map, ($key: $value)) !global;
      }

      @content;

      $theme-map: null !global;
    }
  }
}

@function themed($key) {
  @return map-get($theme-map, $key);
}
